<?php
require_once ('controller/BaseController.class.php');
class DepartamentoController extends BaseController {
	function listarGet() {
		$this->createModel ();
		$d['nav']=$this->getDatosNav();
		$d['mainView'] = $this->model->listarDepartamentos ();
		$this->returnView($d);
	}
	function crearGet() {
		$d['nav']=$this->getDatosNav();
		$this->returnView($d);
	}
	function crearPost() {
		$this->createModel();
		$this->model->crearDepartamento($_POST['nomdep']);
		$d['nav']=$this->getDatosNav();
		$d['mainView']=$_POST['nomdep'];
		$this->returnView($d);
	}
}
?>